1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module soup.ProxyURIResolverT;
26 
27 public  import gio.Cancellable;
28 public  import glib.MainContext;
29 public  import gobject.ObjectG;
30 public  import soup.URI;
31 public  import soup.c.functions;
32 public  import soup.c.types;
33 
34 
35 /** */
36 public template ProxyURIResolverT(TStruct)
37 {
38 	/** Get the main Gtk struct */
39 	public SoupProxyURIResolver* getProxyURIResolverStruct(bool transferOwnership = false)
40 	{
41 		if (transferOwnership)
42 			ownedRef = false;
43 		return cast(SoupProxyURIResolver*)getStruct();
44 	}
45 
46 
47 	/**
48 	 * Asynchronously determines a proxy URI to use for @msg and calls
49 	 * @callback.
50 	 *
51 	 * Deprecated: #SoupProxyURIResolver is deprecated in favor of
52 	 * #GProxyResolver
53 	 *
54 	 * Params:
55 	 *     uri = the #SoupURI you want a proxy for
56 	 *     asyncContext = the #GMainContext to invoke @callback in
57 	 *     cancellable = a #GCancellable, or %NULL
58 	 *     callback = callback to invoke with the proxy address
59 	 *     userData = data for @callback
60 	 *
61 	 * Since: 2.26.3
62 	 */
63 	public void getProxyUriAsync(URI uri, MainContext asyncContext, Cancellable cancellable, SoupProxyURIResolverCallback callback, void* userData)
64 	{
65 		soup_proxy_uri_resolver_get_proxy_uri_async(getProxyURIResolverStruct(), (uri is null) ? null : uri.getURIStruct(), (asyncContext is null) ? null : asyncContext.getMainContextStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData);
66 	}
67 
68 	/**
69 	 * Synchronously determines a proxy URI to use for @uri. If @uri
70 	 * should be sent via proxy, *@proxy_uri will be set to the URI of the
71 	 * proxy, else it will be set to %NULL.
72 	 *
73 	 * Deprecated: #SoupProxyURIResolver is deprecated in favor of
74 	 * #GProxyResolver
75 	 *
76 	 * Params:
77 	 *     uri = the #SoupURI you want a proxy for
78 	 *     cancellable = a #GCancellable, or %NULL
79 	 *     proxyUri = on return, will contain the proxy URI
80 	 *
81 	 * Returns: %SOUP_STATUS_OK if successful, or a transport-level
82 	 *     error.
83 	 *
84 	 * Since: 2.26.3
85 	 */
86 	public uint getProxyUriSync(URI uri, Cancellable cancellable, out URI proxyUri)
87 	{
88 		SoupURI* outproxyUri = null;
89 
90 		auto __p = soup_proxy_uri_resolver_get_proxy_uri_sync(getProxyURIResolverStruct(), (uri is null) ? null : uri.getURIStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &outproxyUri);
91 
92 		proxyUri = ObjectG.getDObject!(URI)(outproxyUri);
93 
94 		return __p;
95 	}
96 }